package com.cxyd.common.exception;

import com.cxyd.common.RestResponse;

/**
 * @Author: huanglianyun
 * @Description:
 * @DATE: Created in 2019/12/20 23:19.
 */
public class CustomException extends RuntimeException {
    //错误代码
    RestResponse restResponse;

    //同郭构造方法的形式,指定resultcode
    public CustomException(RestResponse restResponse){
        this.restResponse=restResponse;
    }

    //通过调这个方法,可以拿到错误代码
    public RestResponse getRestResponse(){
        return restResponse;
    }
}
